<section class="content-header">
	<h1>
		{{title}}<small></small>
	</h1>
</section>
<section class="content">
	<div class="box box-default">
		<div class="col-md-12">
			<div class="box-body" ng-controller="goodstypebrand as at">
				<alertdanger></alertdanger>
				<alertsuccess></alertsuccess>
				<form role="form">
					<div class="box-body">
						<div ng-show=lastgoodstypenameshow class="form-group">
							<label>商品类型</label> <input maxlength="20" required="required"
								ng-model="lastgoodstypename" class="form-control" type="text"
								readonly>

						</div>
						<div ng-show="modifygoodstypeshow" class="form-group">
							<button class="btn btn-default btn-block btn-sm"
								ng-click="clickmodifygoodstype();">修改商品类型</button>
						</div>

						<div ng-show="goodstypeshow" class="form-group"
							ng-init="findallgoodstype();">
							<label>商品类型</label> <select
								ng-model="selectedgoodstype"
								ng-options="gs.name for gs in goodstypeselect"
								class="form-control select2" style="width: 100%;">
								<option ng－value="-1">--请选择--</option>
							</select>

						</div>
						<div class="form-group" ng-init="findallbrand();">
							<label>品牌</label> <select ng-model="selectedbrand"  ng-options="gs.brandname for gs in brandselect" ng-change="brandchange()" class="form-control select2"
								multiple="multiple" data-placeholder="选择需要加入的品牌"
								style="width: 100%;">
								<option ng－value="-1">--请选择--</option>
							</select>
						</div>
						<div class="col-md-3" ng-repeat="at in brands">
							<div class="alert alert-info alert-dismissable">
								
								<h4>
									<i class="icon fa fa-info"></i>
								</h4>
								<div class="form-group">
									<label>品牌名称</label> <input maxlength="20"
										ng-model="at.brandname" class="form-control" type="text"
										placeholder="请输入属性名称">
								</div>
								<div class="form-group">
									<label>显示顺序</label> <input maxlength="3" ng-model="at.sort"
										class="form-control" type="number" placeholder="请输入数字">
								</div>
								<div class="form-group">
									<label> <input type="radio" ng-model="status"
										ng-value="1" class="flat-red" ng-checked="true"> 启用
									</label> <label> <input type="radio" ng-model="status"
										ng-value="0" class="flat-red"> 禁用
									</label>

								</div>
							</div>
						</div>
						<div class="form-group">
							<label> <input type="radio" ng-model="status"
								ng-value="1" class="flat-red" ng-checked="true"> 启用
							</label> <label> <input type="radio" ng-model="status"
								ng-value="0" class="flat-red"> 禁用
							</label>
						</div>

					</div>
					<div class="box-footer">
						<button ng-show="savebtn.show" type="button"
							class="btn btn-primary" ng-click="save();">保存</button>
						<button ng-show="updatebtn.show" type="button"
							class="btn btn-primary" ng-click="update();">更新</button>
					</div>
				</form>
			</div>
		</div>
		<div class="box-footer"></div>
	</div>
</section>
<script>
$(function(){
	$(".select2").select2();
});
</script>